<template>
	<div class="app">
		<Header :typeRoute="type"></Header>
		<router-view />
		<Footer></Footer>
	</div>
</template>

<script>
	export default {
		name: 'app',
		data() {
			return {
				type: null
			}
		},
		watch: {
			$route: {
				immediate: true,
				handler(to, from) {
					if (to.path == '/') {
						this.type = 1
					}
					if (to.path == '/agencySet') {
						this.type = 2
					}
					if (to.path == '/affairsOpen') {
						this.type = 3
					}
					if (to.path == '/newsList') {
						this.type = 4
					}
					if (to.path == '/lawMonitor') {
						this.type = 5
					}
					if (to.path == '/business') {
						this.type = 6
					}
					if (to.path == '/theoryResearch') {
						this.type = 7
					}
					if (to.path == '/baseBuilding') {
						this.type = 8
					}
					if (to.path == '/searchResult') {
						this.type = 9
					}
				}
			}
		},
		methods: {

		}
	}
</script>

<style>
	body {
		height: 100%;
		-moz-osx-font-smoothing: grayscale;
		-webkit-font-smoothing: antialiased;
		text-rendering: optimizeLegibility;
		font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif;
		padding: 0px !important;
		background-color: #FFFFFF;
		margin: 0;
		min-width: 1300px;
	}

	.app {
		display: flex;
		flex-direction: column;
		justify-content: space-between;
	}
</style>